/** @format */

import { _decorator, tween, v3 } from "cc";
import { BaseComponent } from "db://assets/FrameWork/Module/Component/BaseComponent";
const { ccclass, property } = _decorator;

@ccclass("MoleSimpleMole")
export class MoleSimpleMole extends BaseComponent {
    protected init(): void {
        super.init();
        this.scheduleOnce(() => {
            tween(this.node)
                .by(0.2, { position: v3(0, 100) })
                .to(0.1, { scale: v3(1, 1.1, 1) })
                .to(0.1, { scale: v3(1, 1, 1) })
                .delay(1.5)
                .by(0.2, { position: v3(0, -100) })
                .delay(1.5)
                .union()
                .repeatForever()
                .start();
        }, Number(this.node.name) * 0.5);
    }
}
